package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class test extends SeleneseTestCase {
	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://10.112.4.156/");
		selenium.start();
	}

	@Test
	public void testTest() throws Exception {
		selenium.open("/ZuoZhan/index.html");
		selenium.type("id=userId", "yuy");
		selenium.type("id=passWord", "123");
		selenium.click("//input[@id='button3' and @type='button' and @type='button' and @onclick='Login()']");
		selenium.waitForPageToLoad("30000");
		selenium.click("link=模糊查询");
		selenium.selectFrame("frame_content");
		selenium.click("link=全省旅客住店");
		selenium.waitForPageToLoad("30000");
		selenium.type("id=ZHENGJIANHM", "230121198601103459");
		selenium.click("css=input.tijiao2");
		selenium.waitForPageToLoad("30000");
	}

	@After
	public void tearDown() throws Exception {
		selenium.stop();
	}
}
